if status is-interactive
    # Commands to run in interactive sessions can go here
end

# environment parameter
set -x CPATH /usr/include/python3.12 $CPATH
set -x EDITOR vim
set -x GITHUB_TOKEN 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
set -x LD_LIBRARY /usr/local/cuda-12.8/lib64 $LD_LIBRARY
set -x CMAKE_GENERATOR Ninja
set -x PATH /usr/local/cuda-12.8/bin $PATH
set -x TRITON_PRINT_AUTOTUNING 1
set -x UV_DEFAULT_INDEX 'https://pypi.tuna.tsinghua.edu.cn/simple'


# alias
abbr -a ari aria2c -x 16
abbr -a cl clear
abbr -a cod code
abbr -a ls eza
abbr -a ll eza --icons -ahl
abbr -a l eza --icons -a
abbr -a mk mkdir
abbr -a py uv run
abbr -a pip uv pip
abbr -a sf . ~/.config/fish/config.fish
abbr -a tree eza --icons --tree -ahl
abbr -a usu uv self update --token $GITHUB_TOKEN
abbr -a vf vi ~/.config/fish/config.fish
abbr -a ... ../..

# functions
function cc
	rm -rf '/tmp/*'
	rm -rf '~/.triton/cache/*'
	cd ~/.cache/
	find . -not -path '.' -not -path './uv' -not -path './uv/*' -exec rm -rf {} +
	cd -
end

